class Cat:
    def __init__(self, name, age):
        self.name = name
        self.age = age
    def speak(self):
        print("My name is " + self.name)
        print("My age is " + str(self.age))
        print(f"一只{self.age}的叫{self.name}的三花猫向你求抱抱！")
class GoodCat(Cat):
    def __init__(self,name,age,good):
        super().__init__(name,age)
        self.good = good
    def speak(self):
        print(f"{self.name}是一个{self.age}岁的{self.good},品种非常优质")
class Dog():
    def __init__(self,name,age):
        self.name = name
        self.age = age
    def speak(self):
        print(f"{self.name}是一个{self.age}岁的大型犬")
def animal_shout(animal):
    animal.speak()
cat1 = Cat("小花",5)
cat1.speak()
cat2 = GoodCat("丧彪",4,"狸花猫")
cat2.speak()
animal_shout(Dog("旺财",4))